package com.hyz.api;


import com.hyz.pojo.Agency;
import com.hyz.result.AgencyPage;
import com.hyz.result.AgencyResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;


@Api(tags = "经纪人管理API")
public interface AgencyControllerApi {

@ApiOperation(value = "经纪人申请审核，新增接口")
    AgencyResult save(@RequestBody Agency agency);

    @ApiOperation(value = "经纪人分页查询接口")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page",value = "页码",required = true,dataType = "int"),
            @ApiImplicitParam(name = "pageSize",value = "每页记录数",required = true,dataType = "int"),
            @ApiImplicitParam(name = "name",value = "经纪人名称",required = false)
    })
    AgencyPage<Agency> getByPage(Integer page, Integer pageSize, String name);

    @ApiOperation(value = "通过id查询经纪人的信息")
    @ApiImplicitParam(name = "id",value = "经纪人Id",required = true,dataType = "int")
    AgencyResult findById(Integer id);
}
